import requests

# API的URL
url = "http://200.1.1.41:3001/v1/datasets/{dataset_id}/documents".format(
    dataset_id="8129c0ff-74f0-4b47-b609-d0a2cd7278b3",
)

params ={
    "page": 1,
    "limit": 1,
}

# 设置请求头
headers = {
    'Authorization': 'Bearer dataset-nS5zEK03kfDvmAqLl2jkP7pT'
}


try:
    response = requests.get(url, params=params, headers=headers)

    # 检查响应状态码
    if response.status_code == 200:
        print("请求成功！")
        print("响应内容:", response.json())
    else:
        print("请求失败，状态码:", response.status_code)
        print("错误信息:", response.text)
except Exception as e:
    print("发生错误:", e)